﻿using OccurrencesWorkflow.SpecializedControl.ScheduledReturn.Tasks;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace OccurrencesWeb.UserControls.WorkflowTasks.ScheduledReturn
{
    public partial class CompetenceApprovalTaskUserControl : BaseTaskUserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnApprove_Click(object sender, EventArgs e)
        {
            if (TaskId.HasValue)
            {
                CompetenceApprovalTaskControl task = new CompetenceApprovalTaskControl(TaskId.Value);
                task.Approve();
            }
        }

        protected void btnReject_Click(object sender, EventArgs e)
        {
            if (TaskId.HasValue)
            {
                CompetenceApprovalTaskControl task = new CompetenceApprovalTaskControl(TaskId.Value);
                task.Reject();
            }
        }
    }
}